package main

import (
	"fmt"
)

func main() {
	var codeA string
	var codeB string

	fmt.Scan(&codeA)
	fmt.Scan(&codeB)

	sizeA := len(codeA)
	sizeB := len(codeB)

	if sizeA != sizeB {
		fmt.Println("NO")
		return
	}

	isWrong := false
	for i := 0; i < sizeA; i++ {
		if codeA[i] != codeB[sizeA-i-1] {
			isWrong = true
			break
		}
	}

	if isWrong {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}

}
